class Solution(object):
    def countGoodRectangles(self, rectangles):
        rec = [min(c) for c in rectangles]
        t = max(rec)
        return rec.count(t)
